#ifndef ComObj
#include "com_def.h"
com_obj_type ComObj;
#error "no com obj creat"
#endif
static uint8_t idle_check(void)
{
    return com_idle_check(&ComObj);
}

static int16_t wait_for_idle(uint16_t time_out)
{
    return com_wait_for_idle(&ComObj, time_out);
}

static void rcv_st_clr(void)
{
    com_rcv_st_clr(&ComObj);
}

static int16_t signal_rcv_data(uint8_t *p_dat, uint16_t buff_size)
{
    return com_signal_rcv_data(&ComObj, p_dat, buff_size);
}

static int16_t signal_snd_data(const uint8_t *p_dat, uint16_t len)
{
    return com_signal_snd_data(&ComObj, p_dat, len);
}

static int16_t signal_snd_string(const uint8_t *p_dat)
{
    return com_signal_snd_string(&ComObj, p_dat);
}

static void cycle_snd_byte(uint8_t ch)
{
    com_cycle_snd_byte(&ComObj,ch);
}

static int16_t cycle_rcv_byte(void)
{

    return com_cycle_rcv_byte(&ComObj);
}

static void cycle_snd_string(const uint8_t * str)
{
    com_cycle_snd_string(&ComObj, str);
}

static void cycle_snd_data(const uint8_t * dat, uint16_t len)
{
    com_cycle_snd_data(&ComObj, dat, len);
}

static uint16_t cycle_rcv_multi(uint8_t * dat, uint16_t buff_size)
{
    return com_cycle_rcv_multi(&ComObj, dat, buff_size);
}

static uint16_t cycle_rcv_line(uint8_t * dat, uint16_t len_max)
{
    return com_cycle_rcv_line(&ComObj, dat, len_max);
}

static uint16_t cycle_rcv_end_4B(uint8_t * dat, uint16_t len_max, uint32_t symbol)
{
    return com_cycle_rcv_end_4B(&ComObj, dat, len_max, symbol);
}

static uint16_t cycle_rcv_end_3B(uint8_t * dat, uint16_t len_max, uint32_t symbol)
{
    return com_cycle_rcv_end_3B(&ComObj, dat, len_max, symbol);
}

static uint16_t cycle_rcv_end_2B(uint8_t * dat, uint16_t len_max, uint16_t symbol)
{
    return com_cycle_rcv_end_2B(&ComObj, dat, len_max, symbol);
}

static uint16_t cycle_rcv_remain_amount(void)
{
    return com_cycle_rcv_remain_amount(&ComObj);
}

static uint16_t cycle_snd_remain_amount(void)
{
    return com_cycle_snd_remain_amount(&ComObj);
}

static const com_fun_type com_fun =
{
    com_rx_enbale,
    com_tx_enbale,
    com_timer_handle,

    idle_check,
    wait_for_idle,
    rcv_st_clr,

    signal_rcv_data,
    signal_snd_data,
    signal_snd_string,

    cycle_snd_byte,
    cycle_rcv_byte,
    cycle_snd_string,
    cycle_snd_data,
    cycle_rcv_multi,
    cycle_rcv_line,
    cycle_rcv_end_4B,
	cycle_rcv_end_3B,
    cycle_rcv_end_2B,
    cycle_rcv_remain_amount,
    cycle_snd_remain_amount,
};

